package be.nvlooy.moviereminder.entities;

import javax.persistence.*;

@NamedQueries({
	@NamedQuery(name="Movie.getByTypeAndSourceId", query = "SELECT m " +
			"FROM Movie AS m " +
			"WHERE m.originalSourceType = :sourceType AND m.originalSourceId = :sourceId")
})
@Entity
@Table(name="mrm_movie")
public class Movie extends Media {

	@Lob
	@Basic(fetch = FetchType.LAZY)
    @Column(name="movie_id", columnDefinition="blob")
	private byte[] cover;
	
	private String imdbId;
	
	@Column(columnDefinition="text")
	private String overview;
	
	private Double rating;
	
	private String language;


	public byte[] getCover() {
		return cover;
	}

	public void setCover(byte[] cover) {
		this.cover = cover;
	}

	public String getOverview() {
		return overview;
	}

	public void setOverview(String overview) {
		this.overview = overview;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getLanguage() {
		return language;
	}

	public void setRating(double rating) {
		this.rating = rating;
	}

	public double getRating() {
		return rating;
	}

	public void setImdbId(String imdbId) {
		this.imdbId = imdbId;
	}

	public String getImdbId() {
		return imdbId;
	}
	
}
